package com.zzsy.carosshopprojects.activitys.home.mainpage.orderamount;

import android.content.Context;
import android.content.Intent;
import com.king.base.util.ToastUtils;
import com.zzsy.carosshopprojects.R;
import com.zzsy.carosshopprojects.base.BaseActivity;
import com.zzsy.carosshopprojects.util.DataUtil;
import me.yokeyword.fragmentation.anim.FragmentAnimator;

/**
 * 主页操作员订单金额
 */
public class OrderAmountAc extends BaseActivity {
    public static void start(Context mactivity) {
        Intent intent = new Intent(mactivity, OrderAmountAc.class);
        mactivity.startActivity(intent);
    }

    @Override
    protected int bindLayout() {
        return R.layout.ac_common;
    }

    @Override
    protected void initView() {
        if (DataUtil.getInstance().getCustomerType().equals("1"))
            loadRootFragment(R.id.fl_container, OrderAmountFragment.newInstance());
        else if (DataUtil.getInstance().getCustomerType().equals("2"))
            loadRootFragment(R.id.fl_container, OrderReghterAmount.newInstance());
        else {
            ToastUtils.showToast(getApplicationContext(), "操作账号非充值端或消费端");
            finish();
        }

        //全局改变Fragment的动画
        setFragmentAnimator(new FragmentAnimator());
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void loadMethod() {

    }
}
